<!--
 * @description: 新增推广二维码
 * @Author: latiao
 * @Date: 2021-11-09 17:57:24
 * @LastEditors: latiao
 * @LastEditTime: 2021-11-19 09:15:07
-->
<template>
  <view  class="code">
     <image :src="codeImage" class="image" />

  </view>
</template>

<script lang='ts'>
  import {
    Component,
    Vue
  } from 'vue-property-decorator'
    import {
     userIdGet
    } from "@/api/modules/user";
    import {
    getImgCode,
  } from "@/api/modules/goods";
  @Component({
    components: {

    }
  })
export default class PromotionCode extends Vue {
  codeImage:any=''
  created() {
       userIdGet({}).then(id=>{
        const wxaGetwxacode = {
          path: `pages/index/index?userId=${id}`,
          width: 0,
        };
        getImgCode(wxaGetwxacode).then(res=>{
         this.codeImage=res;
        })    
      })   
    }

}
</script>

<style lang="scss" scoped>
.code{
  background-image: url('https://medusa-small-file-1253272780.cos.ap-shanghai.myqcloud.com/gruul/20211110/70436e0bdb7d43dda409a6ead4e63d9f.png');
  background-repeat: no-repeat;
  background-size: 100% auto;
  width: 100%;
  height: 1334rpx;
  position: relative;
}
.image{
  position: absolute; 
  top: 983rpx;
  left: 104rpx;
  width: 222rpx;
  height: 222rpx;
}
</style>